package jp.co.technotree.common.ctrl;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;

import jp.co.technotree.common.ctrl.command.ActionCommandInfo;
import jp.co.technotree.common.ctrl.filter.ActionFilterInfo;

public class ActionInfo implements Serializable{
	private static final long serialVersionUID = 1L;
	public String id = null;
	public String path = null;
	public String beanName = null;
	
	public HashMap<String,ActionCommandInfo> commandMap = null;
	public HashMap<String,ActionViewInfo> viewMap = null;
	public ArrayList<ActionFilterInfo> filterArray = null;
	
	public ActionCommandInfo getCommandInfo(String commandName){
		return commandMap.get(commandName);
	}
	public ActionViewInfo getViewInfo(String viewName){
		return viewMap.get(viewName);
	}
	public ActionFilterInfo getFilter(int idx){
		if ( filterArray == null ) return null;
		return filterArray.get(idx);
	}
	public int getFilterNum(){
		if ( filterArray == null ) return 0;
		return filterArray.size();
	}
}
